package com.wteam.dragon.system.basebean.bean;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnType;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.sql.Timestamp;

/**
 * 主要Bean
 * @author 陈晓辉
 * @date 2020/3/7 16:49
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BaseBean extends MyBaseModel {
    /**
     * 是否删除
     */
    @TableLogic
    @DefaultValue("0")
    @ColumnType(MySqlTypeConstant.TINYINT)
    @Column(comment = "是否删除")
    private Boolean isDelete;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ColumnType(MySqlTypeConstant.TIMESTAMP)
    @Column(comment = "创建时间")
    private Timestamp createTime;
    /**
     * 创建者id
     */
    @TableField(fill = FieldFill.INSERT)
    @ColumnType(MySqlTypeConstant.BIGINT)
    @Column(comment = "创建者id")
    private Long createId;
    /**
     * 更改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ColumnType(MySqlTypeConstant.TIMESTAMP)
    @Column(comment = "更改时间")
    private Timestamp updateTime;
    /**
     * 更改者id
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ColumnType(MySqlTypeConstant.BIGINT)
    @Column(comment = "更改者id")
    private Long updateId;
}
